//
//  GoodsDetailHeader.m
//  CenturyCity
//
//  Created by beisheng03 on 2017/12/13.
//  Copyright © 2017年 beisheng. All rights reserved.
//

#import "GoodsDetailHeader.h"
#import "GoddsEvaluateVC.h"
@interface GoodsDetailHeader ()
@property (weak, nonatomic) IBOutlet UILabel *leftLabel;
@property (weak, nonatomic) IBOutlet UILabel *middleLabel;
@property (weak, nonatomic) IBOutlet UILabel *rightLabel;
@property (weak, nonatomic) IBOutlet UIView *lineView;

@end

@implementation GoodsDetailHeader

- (void)awakeFromNib{
    
    [super awakeFromNib];
    
    self.leftLabel.font = MYFONT(15);
    
    self.leftLabel.textColor = darkGray;
    
    self.middleLabel.font = MYFONT(14);
    
    self.rightLabel.font = MYFONT(14);
    
    self.rightLabel.textColor = [UIColor redColor];
    
//    self.lineView.backgroundColor = [UIColor colorWithHexString:@"e2e2e2"];
    
}

- (void)setModel:(GoodsDetailModel *)model{
    _model = model;
    
    self.leftLabel.text = [NSString stringWithFormat:@"评价(%@)",_model.commit_count];
    
    self.rightLabel.text = _model.match_ratio;
    
    
}



- (IBAction)btnDidTap:(UIButton *)sender {
    
    GoddsEvaluateVC *temp = [[GoddsEvaluateVC alloc]init];
    
    temp.good_id = self.model.goods_id;
    
    [self.viewController.navigationController pushViewController:temp animated:YES];
    
}


/*
 
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
 
*/

@end
